Skip to content

Conversation

@josephjclark
Copy link
Collaborator

@josephjclark josephjclark commented Jul 17, 2023

Quite a scary title but I'm pretty sure this is OK!

This PR enables better unit tests in adaptors by letting us inject adaptor functions as global varibles.

This adds an API to the runtime which is NOT intended to be used by the CLI or Runtime Manager.

We should ask really hard questions about the safety of this but I think it looks OK (so long as it's not exposed to third party code).

Anyway this is a prerequisite for the adaptor testing PR OpenFn/adaptors#296

Checklist before requesting a review

  • I have performed a self-review of my code
  • If needed, I've updated the changelog
  • Amber has QA'd this feature

@josephjclark
Copy link
Collaborator Author

This has been merged into #496 - I'm quite satisfied it's safe and it lets me write really nice unit tests. Closing.

@josephjclark josephjclark deleted the noodle-global-injection branch August 4, 2025 11:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants